﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using StructureMap;
using StructureMap.Configuration.DSL;
using Drempelvrij.DAL.UnitOfWork;
using Drempelvrij.DAL.Repositories;

namespace Drempelvrij.UI.Web
{
    public class BootStrapper
    {
        public static void ConfigureDependencies()
        {

            ObjectFactory.Initialize(x =>
            {
                x.AddRegistry<ControllerRegistry>();
            });

        }

        public class ControllerRegistry : Registry
        {
            public ControllerRegistry()
            {
                For<IUnitOfWork>().Use<NHUnitOfWork>();

                For<IBestratingRepository>().Use<BestratingRepository>();
                For<IGeoDataRepository>().Use<GeoDataRepository>();
                For<IParkeerPlaatsRepository>().Use<ParkeerPlaatsRepository>();
            }
        }
    }
}